#include "service.hpp"
#include "cservice.hpp"

namespace fasys{ namespace cservice{

cservice::~cservice()
{
  delete _service;
}

cservice::cservice()
  : _service(new service)
{
}

void cservice::initialize(ichannels* chs)
{
  _service->get_prototype().get_aspect().get<_publish_>().channels = chs;
}

void cservice::start(fas::mux::imux<>* mux, const config& conf)
{
  _service->stop();
  _service->set_mux(mux);
  _service->set_nonblock(true);
  _service->start("127.0.0.1", 12345);
}

void cservice::stop()
{
}

}}
